package com.star.tkmappermybatis.controller;

import com.star.tkmappermybatis.model.User;
import com.star.tkmappermybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Classname UserController
 * @Author Star
 * @Date 2021/12/24 - 17:49
 * @Description
 */
@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/all")
    public List<User> selectAll(){
        return userService.listUser();
    }
}
